<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>xx</title>
		<script src="ajax.js"></script>
	</head>
	<body>
		<input type="button" id="btn1" value="读取" />
		<script>
		window.onload = function() {
			var xx = document.getElementById('btn1');
			xx.onclick = function() {
				ajax('aaa.txt', function(str) {
						alert(str);
					});
				}
			}
		</script>
	</body>
</html>
